﻿using UnityEngine;
using System.Collections;

public class SnakeHead : MonoBehaviour {

    private Snake _snake;

    void Start()
    { 
        _snake = this.GetComponentInParent<Snake>();
    }
    void OnTriggerEnter(Collider coll)
    {
        if (coll.tag=="Wall"||coll.tag == "Snake")
        {
            _snake.SendMessage("ChangeState");
            ResultManager._instance.ShowScore();
            ResultManager._instance.SendMessage("CheckScore");
            ResultManager._instance.StartBlink();
        }
    }

}
